﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DTO;
using BUS;

namespace GUI
{
    public partial class frmDangNhap : Form
    {
        public frmDangNhap()
        {
            InitializeComponent();
        }

        private void btndangnhap_Click(object sender, EventArgs e)
        {
            try
            {
                DangnhapDTO dangnhap_dto = new DangnhapDTO();
                dangnhap_dto.TenDangNhap = txtten.Text.Trim();
                dangnhap_dto.MatKhau = txtpass.Text.Trim();

                DangNhapBUS dangnhap_bus = new DangNhapBUS();

                DataTable dt = new DataTable();
                dt = dangnhap_bus.sp_DangNhap(dangnhap_dto);

                Form1 frm = new Form1();
                //frm.Show();
                frm.MdiParent = this.MdiParent;
                this.Close();
            }

            catch (Exception ex)

            {
                MessageBox.Show(ex.Message);
            }

           
        }
    }
}